package com.duowei.diandan.constant;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import android.preference.PreferenceManager;

import com.duowei.diandan.R;

public class ImagesDir {
    public static final String SDPATH = Environment.getExternalStorageDirectory() + "/";

    public static final String getZipName() {
        return SDPATH + "Dw/image.zip";
    }

    public static final String getDir() {
        return SDPATH + "Dw/";
    }

    public static String getImageName() {
        return SDPATH + "Dw/image/";
    }

    public static String getImageUrl(Context context) {
        SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context);
        String ip = sharedPref.getString(context.getString(R.string.pref_key_server_ip), "");
        return "http://" + ip + ":2233/server/" + "image.zip";
    }
}
